package com.greyu.ysj.utils;

import java.math.BigDecimal;

public class SubZero {
	 public static String subZeroAndDot(BigDecimal d){ 
	    	String s=String.valueOf(d);
	        if(s.indexOf(".") > 0){  
	            s = s.replaceAll("0+?$", "");//去掉多余的0  
	            s = s.replaceAll("[.]$", "");//如最后一位是.则去掉  
	        }  
	        return s;  
	    }  
}
